home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1994-06-24 | 1.0 KB | 37 lines | [TEXT/3PRM] |
- implementation module palette;
-
- import mac_types;
-
- NewPalette :: !Int !Int !Int !Int !Toolbox -> Toolbox;
- NewPalette entries srcColors srcUsage srcTolerance t
- = code (entries=R4W,srcColors=L,srcUsage=W,srcTolerance=W,t=U)(z=Z){
- instruction 0xAA91
- };
-
- DisposePalette :: !Int !Toolbox -> Toolbox;
- DisposePalette srcPalette t = code (srcPalette=L,t=U)(z=Z){
- instruction 0xAA93
- };
-
- ActivatePalette :: !WindowPtr !Toolbox -> Toolbox;
- ActivatePalette srcWindow t = code (srcWindow=L,t=U)(z=Z){
- instruction 0xAA94
- };
-
- SetPalette :: !WindowPtr !Int !Bool !Toolbox -> Toolbox;
- SetPalette dstWindow srcPalette cUpdates t
- = code (dstWindow=L,srcPalette=L,cUpdates=W,t=U)(z=Z){
- instruction 0xAA95
- };
-
- GetPalette :: !WindowPtr !Toolbox -> (!Int, !Toolbox);
- GetPalette srcWindow t = code (srcWindow=R4L,t=U)(palette=L,z=Z){
- instruction 0xAA96
- };
-
- SetEntryColor :: !Int !Int !(!Int,!Int,!Int) !Toolbox -> Toolbox;
- SetEntryColor dstPalette dstEntry (red,green,blue) t
- = code (blue=W,green=W,red=W,dstPalette=L,dstEntry=W,t=O6U)(z=I6Z){
- instruction 0xAA9C
- };
-